<html>

<head>

    <script src="../axton-compressed.js"></script>
    <script src="../src/axton.test.js"></script>
    <script>
        function exercise() {
            var test0 = new axton.test.TestCase({
                assertionSuccess : function () {
                    axton.test.assert.isNull(null);
                },
                assertionFailure : function () {
                    axton.test.assert.isNull(true);
                }
            }, {
                assertionSuccess : true,
                assertionFailure : true
            });
            //test0.resultsElement = $("results");
            
            test0.run();
            alert(test0.PrintTrace());
            test0.OutputTrace($("results"));
        }
    
        function assertion() {
            var test = new axton.test.TestCase({
                nullChecksTrue : function() {
                    axton.test.assert.isNull(null);
                    axton.test.assert.isNotNull("Some value");
                },
                nullChecksFalse : function() {
                    axton.test.assert.isNotNull(null);
                    axton.test.assert.isNull("Some value");
                },
                arrayObject : function () {
                    axton.test.assert.isObject([] );
                },
                objectObject : function () {
                    axton.test.assert.isObject({} );
                },
                arrayArray : function () {
                    axton.test.assert.isArray([] );
                },
                objectArray : function () {
                    axton.test.assert.isArray({} );
                },
                nullArray : function () {
                    axton.test.assert.isArray();
                },
                undefinedUndefined : function () {
                    axton.test.assert.isUndefined(undefined);
                },
                undefinedNull : function () {
                    axton.test.assert.isUndefined(null);
                },
                blankNull : function () {
                    axton.test.assert.isBlank(null);
                },
                blankUndefined : function () {
                    axton.test.assert.isBlank(undefined);
                },
                blankArray : function () {
                    axton.test.assert.isBlank([ ]);
                },
                notBlankNull : function () {
                    axton.test.assert.isNotBlank(null);
                },
                notBlankUndefined : function () {
                    axton.test.assert.isNotBlank(undefined);
                },
                notBlankArray : function () {
                    axton.test.assert.isNotBlank([ ]);
                },
                trueTrue : function () {
                    axton.test.assert.isTrue(true);
                },
                trueFalse : function () {
                    axton.test.assert.isTrue(false);
                },
                falseTrue : function () {
                    axton.test.assert.isFalse(true);
                },
                falseFalse : function () {
                    axton.test.assert.isFalse(false);
                }
            }, {
                nullChecksTrue : true,
                nullChecksFalse : false,
                arrayObject : false,
                objectObject : true,
                arrayArray : true,
                objectArray : false,
                nullArray : false,
                undefinedUndefined : true,
                undefinedNull : false,
                blankNull : true,
                blankUndefined : true,
                blankArray : false,
                notBlankNull : false,
                notBlankUndefined : false,
                notBlankArray : true,
                trueTrue : true,
                trueFalse : false,
                falseTrue : false,
                falseFalse : true
            
            });
            test.resultsElement = $("results");
            
            test.run();
            test.OutputTrace($("results"));
        }
    </script>
    <link type="text/css" rel="stylesheet" href="../axton-test.css" />
    <style>
        body {
            background-color : #434343;
            padding : 5%;
        }
        h1#a {
            position : absolute;
            top : -15px;
            left : 6px;
        }
        h1#b {
            position : absolute;
            top : -17px;
            left : 4px;
            color : white;
        }
        #results {
            border : 3px double #434343;
            background-color : white;
            width : 40%;
            height : 90%;
            overflow-y : auto;
            position : absolute;
            top : 5%;
            left : 50%;
            padding : 2px;
        }
        .test {
            width : 40%;
            margin-bottom : 5px;
            border : 3px double #434343;
            background-color : white;
            padding : 3px
        }
    </style>

</head>
<body>
<h1 id="a">axton : test cases</h1>
<h1 id="b">axton : test cases</h1>
Test Results Window <button onclick="$('results').clear()">Clear</button>
<div id="results">
</div>
<div class="test">
<strong>Exercise Test Engine</strong>
<button onclick="exercise();">Start</button>
<br />This test will exercise the test engine to ensure that it is possible to have a test step succeed and to have a test step fail.
<br /><em>Note: the second step of this test, "assertionFailure", will fail.  This is essential to demonstrate how to identify a failure as well as to test a basic failure condition.</em>
</div>
<div class="test">
<strong>Assertion Test</strong>
<button onclick="assertion();">Start</button>
<br />This test will verify the proper operation of the assertion functions.
</div>
</body>